#ifndef LRCPAGE_H
#define LRCPAGE_H

#include <QWidget>
#include <QPropertyAnimation>
#include <QDebug>
#include <QFile>
#include <QVector>
#include "mlabel.h"

struct LrcWordLine
{
    qint64 time;
    QString lrcText;

    LrcWordLine(qint64 time,QString lrcText)
        :time(time),lrcText(lrcText)
    {}
};

namespace Ui {
class LrcPage;
}

class LrcPage : public QWidget
{
    Q_OBJECT

public:
    explicit LrcPage(QWidget *parent = nullptr);
    ~LrcPage();

    bool parseLrcFile(const QString lrcPath);
    void showLrcWordLine(qint64 time);
    int getLrcWordLineIndex(qint64 time);
    QString getLrcWordByIndex(int index);

    void setNameAndSinger(const QString Name,const QString singer);
private:
    Ui::LrcPage *ui;

    QVector<LrcWordLine> lrcWordLines;
};

#endif // LRCPAGE_H
